import request from '@/router/axios'

//	分页查询价格组列表
export function goodsPriceFetchList(query) {
  return request({
    url: '/eims/goodsPrice/page',
    method: 'get',
    params: query
  })
}

//	列表查询价格组列表
export function goodsPriceList(query) {
  return request({
    url: '/eims/priceGroup/list',
    method: 'get',
    params: query
  })
}

export function goodsPriceAddObj(obj) {
  return request({
    url: '/eims/goodsPrice',
    method: 'post',
    data: obj
  })
}

export function goodsPriceGetObj(id) {
  return request({
    url: '/eims/goodsPrice/' + id,
    method: 'get'
  })
}

export function goodsPriceDelObj(id) {
  return request({
    url: '/eims/goodsPrice/' + id,
    method: 'delete'
  })
}

export function goodsPricePutObj(obj) {
  return request({
    url: '/eims/goodsPrice',
    method: 'put',
    data: obj
  })
}


//	促销管理中  获取品种相关价格
export function getBrandPrice(saleCtgId,supplyId,brandId,spec) {
  return request({
    url: '/eims/goodsPrice/getPrice/'+ saleCtgId +'/' + supplyId +'/' + brandId +'/' + spec,
    method: 'get'
  })
}

//	促销管理中  获取品种相关价格
export function getBrandPrice2(saleCtgId,supplyId,brandId) {
  return request({
    url: '/eims/goodsPrice/getPrice/'+ saleCtgId +'/' + supplyId +'/' + brandId,
    method: 'get'
  })
}
